StartSimulationEngine  "SimState/basicsim.xml"

AddNewEntity    longwall   /Position:0  0.2  -6
AddBoxShape   /Dimensions:20  0.4  0.4   /Mass:10


Random  rnd
 
x = rnd.NextDouble()
z = rnd.NextDouble()

x = (x - 0.5) * 4
z = (z - 0.5) * 4


print "x is " + Util.ToString(x) + ", and z is " + Util.ToString(z)
	  
AddDifferentialDriveEntity    base1 /Position:{x}    0    {z}
	 
AddBumperEntity    bumper1  /ParentEntity:base1
	  /Procedure:proc1
	  
FlushScript  
	 
base1.Go() 



Procedure  proc1

	base1.SetPose(x, 0, z)

End